package com.dayaokeji.server_api.domain;

import android.text.TextUtils;

import java.io.Serializable;

/**
 * Created by Gorden on 2017/9/28.
 */

public class UserInfo implements Serializable{


    private static final long serialVersionUID = -3727232141054400807L;
    private String id; // 失误类型，后续有时间再改
    private String name;
    private String password;
    private String workNo;
    private String pictureId;
    private String classId;
    private String className; // 班级
    private int sex;
    private String birthday;
    private String majorId;
    private String majorName; // 专业
    private String facultyId;
    private String facultyName; // 学院
    private long universityId;
    private String universityName; // 学校
    private String phone;
    private String email;
    private String imPswd;
    private String token;
    private int type;
    private String region = "";
    private String sign;
    private boolean bind;
    private int localAvatar = -1;
    private String inteadsStatus; //插屏
    private Integer nativadsStatus; //原生
    private String openadsStatus; //开屏
    private String videoadsStatus; //视频

    public String getInteadsStatus() {
        return inteadsStatus;
    }

    public void setInteadsStatus(String inteadsStatus) {
        this.inteadsStatus = inteadsStatus;
    }

    public Integer getNativadsStatus() {
        return nativadsStatus;
    }

    public void setNativadsStatus(Integer nativadsStatus) {
        this.nativadsStatus = nativadsStatus;
    }

    public String getOpenadsStatus() {
        return openadsStatus;
    }

    public void setOpenadsStatus(String openadsStatus) {
        this.openadsStatus = openadsStatus;
    }

    public String getVideoadsStatus() {
        return videoadsStatus;
    }

    public void setVideoadsStatus(String videoadsStatus) {
        this.videoadsStatus = videoadsStatus;
    }


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name == null? "" : name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getWorkNo() {
        return workNo;
    }

    public void setWorkNo(String workNo) {
        this.workNo = workNo;
    }

    public String getPictureId() {
        return TextUtils.isEmpty(pictureId) ? "" : pictureId;
    }

    public void setPictureId(String pictureId) {
        this.pictureId = pictureId;
    }

    public String getClassId() {
        return classId;
    }

    public void setClassId(String classId) {
        this.classId = classId;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public int getSex() {
        return sex;
    }

    public void setSex(int sex) {
        this.sex = sex;
    }

    public String getBirthday() {
        return birthday;
    }

    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }

    public String getMajorId() {
        return majorId;
    }

    public void setMajorId(String majorId) {
        this.majorId = majorId;
    }

    public String getMajorName() {
        return majorName;
    }

    public void setMajorName(String majorName) {
        this.majorName = majorName;
    }

    public String getFacultyId() {
        return facultyId;
    }

    public void setFacultyId(String facultyId) {
        this.facultyId = facultyId;
    }

    public String getFacultyName() {
        return facultyName;
    }

    public void setFacultyName(String facultyName) {
        this.facultyName = facultyName;
    }

    public long getUniversityId() {
        return universityId;
    }

    public void setUniversityId(long universityId) {
        this.universityId = universityId;
    }

    public String getUniversityName() {
        return universityName;
    }

    public void setUniversityName(String universityName) {
        this.universityName = universityName;
    }

    public String getPhone() {
        return phone == null ? "" : phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getImPswd() {
        return imPswd;
    }

    public void setImPswd(String imPswd) {
        this.imPswd = imPswd;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getRegion() {
        return region;
    }

    public void setRegion(String region) {
        this.region = region;
    }

    public String getSign() {
        return sign;
    }

    public void setSign(String sign) {
        this.sign = sign;
    }

    public boolean isBind() {
        return bind;
    }

    public void setBind(boolean bind) {
        this.bind = bind;
    }

    public int getLocalAvatar() {
        return localAvatar;
    }

    public void setLocalAvatar(int localAvatar) {
        this.localAvatar = localAvatar;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj instanceof UserInfo) {
            if (this.getId().equals(((UserInfo) obj).id)) {
                return true;
            }
        }
        return super.equals(obj);
    }

    @Override
    public int hashCode() {
        return id.hashCode();
    }

    @Override
    public String toString() {
        return "UserInfo{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", password='" + password + '\'' +
                ", workNo='" + workNo + '\'' +
                ", pictureId='" + pictureId + '\'' +
                ", classId='" + classId + '\'' +
                ", className='" + className + '\'' +
                ", sex=" + sex +
                ", birthday='" + birthday + '\'' +
                ", majorId='" + majorId + '\'' +
                ", majorName='" + majorName + '\'' +
                ", facultyId='" + facultyId + '\'' +
                ", facultyName='" + facultyName + '\'' +
                ", universityId=" + universityId +
                ", universityName='" + universityName + '\'' +
                ", phone='" + phone + '\'' +
                ", email='" + email + '\'' +
                ", imPswd='" + imPswd + '\'' +
                ", token='" + token + '\'' +
                ", type=" + type +
                ", region='" + region + '\'' +
                ", sign='" + sign + '\'' +
                ", bind=" + bind +
                '}';
    }
}
